export const checkPassword = password => `${password}`.length === 6;

export const isPhoneNumber = phone => /^1[3-9]\d{9}$/.test(phone);

export const isVerifyCode = code => /^\d{6}$/.test(code);

export const cryptPhone = phone =>
  phone ? `${phone.substr(0, 3)}****${phone.substr(-4)}` : phone;
